﻿<template>

    <div class="index_bottom_f_m">
      <div class="bottom_bg_cover" style="background-color:#fff;"></div>
        <a v-for="info in menu_list" :to='{path:info.url_name}'
          :key="info.id" class="index_bottom_btn"
          active-class="index_bottom_active"
          :class="info.css_name"
          v-on:click="jump(info.url_name)"
        >
        <img  v-bind:src="info.icon" class="bot_icon" alt="" :class="info.css_name1">
        <p class="bottom_sty_fs">{{ info.text }}</p>
      </a>
    </div>

</template>

<script>
  import '../../static/css/FooterMenu.css';
  import {mapState, mapMutations, mapActions} from 'vuex';
  import store from '../vuex/store_index';
  import common from "../common/common.js"
  import use_rem from "../../static/js/use_rem.js"
  use_rem();
  export default {
    name: 'FooterMenu',
    data () {
      return {
        menu_list: this.$store.getters.get_footer_menu_list,
        sign_c: true
      }
    },
    computed: mapState([
      'footer_menu_list'
    ]),
    methods: {
      ...mapActions(['redirect']),
      jump: function (name) {
        let id = name.replace("./", "");
        //common.jump({
        //  url: name,
        //  id: id
        //});

        //关闭所有 webview
        let all = plus.webview.all();
        console.log("all________________________________");
        console.log(all);
        //current webview
        var curr = plus.webview.currentWebview();
        for (let i = 0, len = all.length; i < len; i++) {
          //关闭除setting页面外的其他页面
          if (all[i].getURL() == curr.getURL())
            continue;
            plus.webview.close(all[i]);
        }

        mui.openWindow({
          url:name,
          id: id,
          createNew: false,//是否重复创建同样id的webview，默认为false:不重复创建，直接显示
          show: {
            autoShow: true,//页面loaded事件发生后自动显示，默认为true
            aniShow: "zoom-fade-in",//页面显示动画，默认为”slide-in-right“；
          },
          waiting: {
            autoShow: true,//自动显示等待框，默认为true
            title: '正在加载...',//等待对话框上显示的提示内容
          }
        })

      }
    },
    mounted: function () {
      console.log("install____________________-");
      console.log("footer_sssssssssssssssssss");
//    this.$store.getters.Get_Bot_C_obj
    }
  }
</script>
<!--inner style for thom template-->
<style scoped>
  .index_bottom_f_m{
    background-color:#ffffff;
  }
  .bottom_bg_cover{
    background-color:#fff;
  }
</style>

